﻿using DC2010.Objects.Data;

namespace DC2010.Effects
{
    public class InstancesEffects
    {
        public I_Die_Effect I_Die_Effect { get; set; }
        public I_Ressurect_Effect I_Ressurect_Effect { get; set; }
        public I_JoinParty_Effect I_JoinParty_Effect { get; set; }
        public I_Drink_Effect I_Drink_Effect { get; set; }
        public I_PutItemInInventory_Effect I_PutItemInInventory_Effect { get; set; }


        public InstancesEffects()
        {
            //Die ;)
            EffectInfo ei1 = Root.I.EffectSystem.GetInfo("I_DIE_EFFECT");
            if (ei1!=null)
                I_Die_Effect = (I_Die_Effect)ei1.CreateData().L;

            EffectInfo ei2 = Root.I.EffectSystem.GetInfo("I_RESURRECT_EFFECT");
            if (ei2!=null)
                I_Ressurect_Effect = (I_Ressurect_Effect)ei2.CreateData().L;

            EffectInfo ei3 = Root.I.EffectSystem.GetInfo("I_JOIN_PARTY_EFFECT");
            if (ei3!=null)
            I_JoinParty_Effect = (I_JoinParty_Effect)ei3.CreateData().L;

            EffectInfo ei4 = Root.I.EffectSystem.GetInfo("I_DRINK_EFFECT");
            if (ei4!=null)
            I_Drink_Effect = (I_Drink_Effect)ei4.CreateData().L;

            EffectInfo ei5 = Root.I.EffectSystem.GetInfo("I_PUT_ITEM_INTO_INVENTORY_EFFECT");
            if (ei5 != null)
                I_PutItemInInventory_Effect = (I_PutItemInInventory_Effect)ei5.CreateData().L;

        }
    }
}
